package com.itheima.project.hystrix;

import com.itheima.project.basic.ResponseWrap;
import com.itheima.project.core.enums.file.FileEnum;
import com.itheima.project.feign.FileFeign;
import com.itheima.project.utils.ResponseWrapBuild;
import com.itheima.project.vo.file.FileVo;
import com.itheima.project.vo.file.UploadMultipartFile;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

/**
 * @ClassName FileHystrix.java
 * @Description FileFeign的Hystrix
 */
@Component
public class FileHystrix implements FileFeign {

    @Override
    public ResponseWrap<FileVo> downLoad(Long fileId) {
        return ResponseWrapBuild.build(FileEnum.DOWNLOAD_FAIL,null);
    }

    @Override
    public ResponseWrap<FileVo> upLoad(UploadMultipartFile file,
                                       String  businessType,
                                       String  enterpriseId) {
        return ResponseWrapBuild.build(FileEnum.UPLOAD_FAIL,null);
    }

    @Override
    public ResponseWrap<List<FileVo>> bindBusinessId(Long fileId, Long businessId) {
        return ResponseWrapBuild.build(FileEnum.BIND_FAIL,null);
    }

    @Override
    public ResponseWrap<List<FileVo>> bindBusinessId(FileVo fileVo) {
        return ResponseWrapBuild.build(FileEnum.BIND_FAIL,null);
    }

    @Override
    public ResponseWrap<Boolean> replaceBindBusinessId(FileVo fileVo) {
        return ResponseWrapBuild.build(FileEnum.BIND_FAIL,null);
    }

    @Override
    public ResponseWrap<Boolean> replaceBindBatchBusinessId(ArrayList<FileVo> fileVos) {
        return ResponseWrapBuild.build(FileEnum.BIND_FAIL,null);
    }

    @Override
    public ResponseWrap<List<FileVo>> bindBatchBusinessId(ArrayList<FileVo> fileVos) {
        return ResponseWrapBuild.build(FileEnum.BIND_FAIL,null);
    }

    @Override
    public ResponseWrap<List<FileVo>> findFileVoByBusinessId(FileVo fileVo) {
        return ResponseWrapBuild.build(FileEnum.SELECT_FILE_BUSINESSID_FAIL,null);
    }

    @Override
    public ResponseWrap<List<FileVo>> findFileVoByBusinessId(Long businessId) {
        return ResponseWrapBuild.build(FileEnum.SELECT_FILE_BUSINESSID_FAIL,null);
    }

    @Override
    public ResponseWrap<Boolean> deleteFileVoByBusinessId(FileVo fileVo) {
        return ResponseWrapBuild.build(FileEnum.DELETE_FAIL,false);
    }
}
